<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Gets certain parameters</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.ps-get-buffer.html">« ps_get_buffer</a></li>
      <li style="float: right;"><a href="function.ps-get-value.html">ps_get_value »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.ps.html">PS 函数</a></li>
    <li>Gets certain parameters</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.ps-get-parameter" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ps_get_parameter</h1>
  <p class="verinfo">(PECL ps &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">ps_get_parameter</span> &mdash; <span class="dc-title">Gets certain parameters</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ps-get-parameter-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ps_get_parameter</strong></span>(<span class="methodparam"><span class="type">resource</span> <code class="parameter">$psdoc</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type">float</span> <code class="parameter">$modifier</code><span class="initializer"> = ?</span></span>): <span class="type"><span class="type">string</span>|<span class="type"><span class="type false">false</span></span></span></div>

  <p class="para rdfs-comment">
   Gets several parameters which were directly set by
   <span class="function"><a href="function.ps-set-parameter.html" class="function">ps_set_parameter()</a></span> or indirectly by one of the other
   functions. Parameters are by definition string
   values. This function cannot be used to retrieve resources which were also
   set by <span class="function"><a href="function.ps-set-parameter.html" class="function">ps_set_parameter()</a></span>.
  </p>
  <p class="para">
   The parameter <code class="parameter">name</code> can have the following values.
  </p>
  <p class="para">
   <dl>
    
     <dt>
<code class="literal">fontname</code></dt>

     <dd>

      <p class="para">
       The name of the currently active font or the font whose
       identifier is passed in parameter <code class="parameter">modifier</code>.
      </p>
     </dd>

    
    
     <dt>
<code class="literal">fontencoding</code></dt>

     <dd>

      <p class="para">
       The encoding of the currently active font.
      </p>
     </dd>

    
    
     <dt>
<code class="literal">dottedversion</code></dt>

     <dd>

      <p class="para">
       The version of the underlying pslib library in the format
       &lt;major&gt;.&lt;minor&gt;.&lt;subminor&gt;
      </p>
     </dd>

    
    
     <dt>
<code class="literal">scope</code></dt>

     <dd>

      <p class="para">
       The current drawing scope. Can be object, document, null, page,
       pattern, path, template, prolog, font, glyph.
      </p>
     </dd>

    
    
     <dt>
<code class="literal">ligaturedisolvechar</code></dt>

     <dd>

      <p class="para">
       The character which dissolves a ligature. If your are using a font
       which contains the ligature `ff&#039; and `|&#039; is the char to dissolve the
       ligature, then `f|f&#039; will result in two `f&#039; instead of the ligature `ff&#039;.
      </p>
     </dd>

    
    
     <dt>
<code class="literal">imageencoding</code></dt>

     <dd>

      <p class="para">
       The encoding used for encoding images. Can be either
       <code class="literal">hex</code> or <code class="literal">85</code>. hex encoding
       uses two bytes in the postscript file each byte in the image.
       85 stand for Ascii85 encoding.
      </p>
     </dd>

    
    
     <dt>
<code class="literal">linenumbermode</code></dt>

     <dd>

      <p class="para">
       Set to <code class="literal">paragraph</code> if lines are numbered
       within a paragraph or <code class="literal">box</code> if they are
       numbered within the surrounding box.
      </p>
     </dd>

    
    
     <dt>
<code class="literal">linebreak</code></dt>

     <dd>

      <p class="para">
       Only used if text is output with <span class="function"><a href="function.ps-show-boxed.html" class="function">ps_show_boxed()</a></span>.
       If set to <strong><code>true</code></strong> a carriage return will add a line
       break.
      </p>
     </dd>

    
    
     <dt>
<code class="literal">parbreak</code></dt>

     <dd>

      <p class="para">
       Only used if text is output with <span class="function"><a href="function.ps-show-boxed.html" class="function">ps_show_boxed()</a></span>.
       If set to <strong><code>true</code></strong> a carriage return will start
       a new paragraph.
      </p>
     </dd>

    
    
     <dt>
<code class="literal">hyphenation</code></dt>

     <dd>

      <p class="para">
       Only used if text is output with <span class="function"><a href="function.ps-show-boxed.html" class="function">ps_show_boxed()</a></span>.
       If set to <strong><code>true</code></strong> the paragraph will be hyphenated
       if a hypen dictionary is set and exists.
      </p>
     </dd>

    
    
     <dt>
<code class="literal">hyphendict</code></dt>

     <dd>

      <p class="para">
       Filename of the dictionary used for hyphenation pattern.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ps-get-parameter-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">psdoc</code></dt>

     <dd>

      <p class="para">
       Resource identifier of the postscript file
       as returned by <span class="function"><a href="function.ps-new.html" class="function">ps_new()</a></span>.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">name</code></dt>

     <dd>

      <p class="para">
       Name of the parameter.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">modifier</code></dt>

     <dd>

      <p class="para">
       An identifier needed if a parameter of a resource is requested,
       e.g. the size of an image. In such a case the resource id is
       passed.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ps-get-parameter-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the value of the parameter  或者在失败时返回 <strong><code>false</code></strong>.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ps-get-parameter-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.ps-set-parameter.html" class="function" rel="rdfs-seeAlso">ps_set_parameter()</a> - Sets certain parameters</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>